<?php
class auth extends SClass {

    public function process() {
        $user = $this->getUserSecure();
        if ($user) {
            $this->setValue('user', true);
        }
        if ($this->getArgumentSecure('ok')) {
            $login = $this->getArgumentSecure('login');
            $pass = $this->getArgumentSecure('pass');
            if ($login && $pass) {
                try {
                    Triumph::Get()->getUserService()->login($login, $pass, true);
                    $this->setValue('message', 'ok');
                } catch (Exeption $e) {
                    $this->setValue('message', 'error');
                }
            }
        }
    }

}